CXX = g++
CXXFLAGS += -g -std=c++11
CXXSFLAGS += -shared -fPIC

LIB_DIR = ../lib
BIN_DIR = ../bin
INC_DIR = ../include

INC  += -I/usr/local/include -I/usr/include -I$(INC_DIR) -I/usr/include/mysql \

LIBS = -L/lib64 -lfastcgipp -lboost_thread -lboost_system -lboost_system -lboost_date_time -lpthread \
		
COMM_LIB = -L$(LIB_DIR) -lcomm -L/lib64 -lfastcgipp -lpthread \
			-lboost_thread -lboost_system -lboost_system -lboost_date_time \
			-L/usr/local/lib -lmysqlpp \
			-L/lib64/mysql -lmysqlclient \
			-L/lib64 -lhiredis \
			-L/lib64 -lspnetkit \

TARGETS = 	\
		test \


CLEANUP = rm -rf $(TARGETS) *.o

all:$(TARGETS)
	
clean:
	$(CLEANUP)

test:test.o
	$(CXX) $(CXXFLAGS) $(INC) $(COMM_LIB)  $^ -o $@

%.o:%.cpp
	$(CXX) $(CXXFLAGS) $(CXXSFLAGS) $(INC) -c $< -o $@
	
